<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
  Class: Answer
  
    &mdash; Documentation by YARD 0.7.3
  
</title>

  <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />

  <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  relpath = '';
  if (relpath != '') relpath += '/';
</script>

  <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="js/app.js"></script>


  </head>
  <body>
    <script type="text/javascript" charset="utf-8">
      if (window.top.frames.main) document.body.className = 'frames';
    </script>
    
    <div id="header">
      <div id="menu">
  
    <a href="_index.html">Index (A)</a> &raquo; 
    
    
    <span class="title">Answer</span>
  
  
  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  
    <a id="class_list_link" href="#">Class List</a>
  
    <a id="method_list_link" href="#">Method List</a>
  
    <a id="file_list_link" href="#">File List</a>
  
</div>
      <div class="clear"></div>
    </div>
    
    <iframe id="search_frame"></iframe>
    
    <div id="content"><h1>Class: Answer
  
  
  
</h1>

<dl class="box">
  
    <dt class="r1">Inherits:</dt>
    <dd class="r1">
      <span class="inheritName">ActiveRecord::Base</span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next">ActiveRecord::Base</li>
          
            <li class="next">Answer</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
      </dd>
    
  
  
    
  
    
  
  
  
    <dt class="r2 last">Defined in:</dt>
    <dd class="r2 last">app/models/answer.rb</dd>
  
</dl>
<div class="clear"></div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    <p>
ELMO - Secure, robust, and versatile data collection. Copyright 2011 The
Carter Center
</p>
<p>
ELMO is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.
</p>
<p>
ELMO is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
</p>
<p>
You should have received a copy of the GNU General Public License along
with ELMO. If not, see &lt;http://www.gnu.org/licenses/&gt;.
</p>


  </div>
</div>
<div class="tags">
  

</div>

  


  

  
    <h2>
      Class Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#new_from_str-class_method" title="new_from_str (class method)">+ (Object) <strong>new_from_str</strong>(params) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
    </ul>
  
    <h2>
      Instance Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#all_choices-instance_method" title="#all_choices (instance method)">- (Object) <strong>all_choices</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#all_choices%3D-instance_method" title="#all_choices= (instance method)">- (Object) <strong>all_choices=</strong>(params) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#can_have_choices%3F-instance_method" title="#can_have_choices? (instance method)">- (Boolean) <strong>can_have_choices?</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#choice_for-instance_method" title="#choice_for (instance method)">- (Object) <strong>choice_for</strong>(option) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#choice_hash-instance_method" title="#choice_hash (instance method)">- (Object) <strong>choice_hash</strong>(options = {}) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#hidden%3F-instance_method" title="#hidden? (instance method)">- (Boolean) <strong>hidden?</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#integer%3F-instance_method" title="#integer? (instance method)">- (Boolean) <strong>integer?</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#location%3F-instance_method" title="#location? (instance method)">- (Boolean) <strong>location?</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#numeric%3F-instance_method" title="#numeric? (instance method)">- (Boolean) <strong>numeric?</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#options-instance_method" title="#options (instance method)">- (Object) <strong>options</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#question-instance_method" title="#question (instance method)">- (Object) <strong>question</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#question_hint-instance_method" title="#question_hint (instance method)">- (Object) <strong>question_hint</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#question_name-instance_method" title="#question_name (instance method)">- (Object) <strong>question_name</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#question_type_name-instance_method" title="#question_type_name (instance method)">- (Object) <strong>question_type_name</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#rank-instance_method" title="#rank (instance method)">- (Object) <strong>rank</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#required%3F-instance_method" title="#required? (instance method)">- (Boolean) <strong>required?</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#select_options-instance_method" title="#select_options (instance method)">- (Object) <strong>select_options</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'></div></span>
  
</li>

      
    </ul>
  


  

  <div id="class_method_details" class="method_details_list">
    <h2>Class Method Details</h2>
    
    
      <div class="method_details first">
  <p class="signature first" id="new_from_str-class_method">
  
    + (<tt>Object</tt>) <strong>new_from_str</strong>(params) 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/answer.rb', line 29</span>

<span class='def def kw'>def</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='new_from_str identifier id'>new_from_str</span><span class='lparen token'>(</span><span class='params identifier id'>params</span><span class='rparen token'>)</span>
  <span class='str identifier id'>str</span> <span class='assign token'>=</span> <span class='params identifier id'>params</span><span class='dot token'>.</span><span class='delete identifier id'>delete</span><span class='lparen token'>(</span><span class='symbol val'>:str</span><span class='rparen token'>)</span>
  <span class='ans identifier id'>ans</span> <span class='assign token'>=</span> <span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='params identifier id'>params</span><span class='rparen token'>)</span>

  <span class='comment val'># if there was no answer to this question (in the case of a out of sync form) just leave it blank</span>
  <span class='return return kw'>return</span> <span class='ans identifier id'>ans</span> <span class='if if_mod kw'>if</span> <span class='str identifier id'>str</span><span class='dot token'>.</span><span class='nil? fid id'>nil?</span>

  <span class='comment val'># set the attributes based on the question type</span>
  <span class='case case kw'>case</span> <span class='ans identifier id'>ans</span><span class='dot token'>.</span><span class='question_type_name identifier id'>question_type_name</span>
  <span class='when when kw'>when</span> <span class='string val'>&quot;select_one&quot;</span>
    <span class='ans identifier id'>ans</span><span class='dot token'>.</span><span class='option_id identifier id'>option_id</span> <span class='assign token'>=</span> <span class='str identifier id'>str</span><span class='dot token'>.</span><span class='to_i identifier id'>to_i</span>
  <span class='when when kw'>when</span> <span class='string val'>&quot;select_multiple&quot;</span>
    <span class='str identifier id'>str</span><span class='dot token'>.</span><span class='split identifier id'>split</span><span class='lparen token'>(</span><span class='string val'>&quot; &quot;</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='each identifier id'>each</span><span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='oid identifier id'>oid</span><span class='bitor op'>|</span> <span class='ans identifier id'>ans</span><span class='dot token'>.</span><span class='choices identifier id'>choices</span><span class='dot token'>.</span><span class='build identifier id'>build</span><span class='lparen token'>(</span><span class='symbol val'>:option_id</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='oid identifier id'>oid</span><span class='dot token'>.</span><span class='to_i identifier id'>to_i</span><span class='rparen token'>)</span><span class='rbrace token'>}</span>
  <span class='else else kw'>else</span>
    <span class='ans identifier id'>ans</span><span class='dot token'>.</span><span class='value identifier id'>value</span> <span class='assign token'>=</span> <span class='str identifier id'>str</span>
  <span class='end end kw'>end</span>
  <span class='ans identifier id'>ans</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>
    
    
      <div class="method_details first">
  <p class="signature first" id="all_choices-instance_method">
  
    - (<tt>Object</tt>) <strong>all_choices</strong> 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


59
60
61
62
63
64
65
66
67
68
69
70</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/answer.rb', line 59</span>

<span class='def def kw'>def</span> <span class='all_choices identifier id'>all_choices</span>
  <span class='comment val'># for each option, if we have a matching choice, return it and set it's fake bit to true</span>
  <span class='comment val'># otherwise create one and set its fake bit to false</span>
  <span class='options identifier id'>options</span><span class='dot token'>.</span><span class='collect identifier id'>collect</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='o identifier id'>o</span><span class='bitor op'>|</span>
    <span class='if if kw'>if</span> <span class='c identifier id'>c</span> <span class='assign token'>=</span> <span class='choice_for identifier id'>choice_for</span><span class='lparen token'>(</span><span class='o identifier id'>o</span><span class='rparen token'>)</span>
      <span class='c identifier id'>c</span><span class='dot token'>.</span><span class='checked identifier id'>checked</span> <span class='assign token'>=</span> <span class='true true kw'>true</span>
    <span class='else else kw'>else</span>
      <span class='c identifier id'>c</span> <span class='assign token'>=</span> <span class='choices identifier id'>choices</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='symbol val'>:option_id</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='o identifier id'>o</span><span class='dot token'>.</span><span class='id identifier id'>id</span><span class='comma token'>,</span> <span class='symbol val'>:checked</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='false false kw'>false</span><span class='rparen token'>)</span>
    <span class='end end kw'>end</span>
    <span class='c identifier id'>c</span>
  <span class='end end kw'>end</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="all_choices=-instance_method">
  
    - (<tt>Object</tt>) <strong>all_choices=</strong>(params) 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/answer.rb', line 72</span>

<span class='def def kw'>def</span> <span class='all_choices= identifier id'>all_choices=</span><span class='lparen token'>(</span><span class='params identifier id'>params</span><span class='rparen token'>)</span>
  <span class='comment val'># create a bunch of temp objects, discarding any unchecked choices</span>
  <span class='submitted identifier id'>submitted</span> <span class='assign token'>=</span> <span class='params identifier id'>params</span><span class='dot token'>.</span><span class='values identifier id'>values</span><span class='dot token'>.</span><span class='collect identifier id'>collect</span><span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='p identifier id'>p</span><span class='bitor op'>|</span> <span class='p identifier id'>p</span><span class='lbrack token'>[</span><span class='symbol val'>:checked</span><span class='rbrack token'>]</span> <span class='eq op'>==</span> <span class='string val'>'1'</span> <span class='question op'>?</span> <span class='Choice constant id'>Choice</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='p identifier id'>p</span><span class='rparen token'>)</span> <span class='colon op'>:</span> <span class='nil nil kw'>nil</span><span class='rbrace token'>}</span><span class='dot token'>.</span><span class='compact identifier id'>compact</span>
  
  <span class='comment val'># copy new choices into old objects, creating or deleting if necessary</span>
  <span class='choices identifier id'>choices</span><span class='dot token'>.</span><span class='match identifier id'>match</span><span class='lparen token'>(</span><span class='submitted identifier id'>submitted</span><span class='comma token'>,</span> <span class='Proc constant id'>Proc</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='c identifier id'>c</span><span class='bitor op'>|</span> <span class='c identifier id'>c</span><span class='dot token'>.</span><span class='option_id identifier id'>option_id</span><span class='rbrace token'>}</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='orig identifier id'>orig</span><span class='comma token'>,</span> <span class='subd identifier id'>subd</span><span class='bitor op'>|</span>
    <span class='comment val'># if both exist, do nothing</span>
    <span class='comment val'># if submitted is nil, destroy the original</span>
    <span class='if if kw'>if</span> <span class='subd identifier id'>subd</span><span class='dot token'>.</span><span class='nil? fid id'>nil?</span>
      <span class='choices identifier id'>choices</span><span class='dot token'>.</span><span class='delete identifier id'>delete</span><span class='lparen token'>(</span><span class='orig identifier id'>orig</span><span class='rparen token'>)</span>
    <span class='comment val'># if original is nil, add the new one to this response's array</span>
    <span class='elsif elsif kw'>elsif</span> <span class='orig identifier id'>orig</span><span class='dot token'>.</span><span class='nil? fid id'>nil?</span>
      <span class='choices identifier id'>choices</span> <span class='lshft op'>&lt;&lt;</span> <span class='subd identifier id'>subd</span>
    <span class='end end kw'>end</span>
  <span class='end end kw'>end</span>  
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="can_have_choices?-instance_method">
  
    - (<tt>Boolean</tt>) <strong>can_have_choices?</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    

  </div>
</div>
<div class="tags">
  
<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


96</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/answer.rb', line 96</span>

<span class='def def kw'>def</span> <span class='can_have_choices? fid id'>can_have_choices?</span><span class='semicolon token'>;</span> <span class='question_type_name identifier id'>question_type_name</span> <span class='eq op'>==</span> <span class='string val'>&quot;select_multiple&quot;</span> <span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="choice_for-instance_method">
  
    - (<tt>Object</tt>) <strong>choice_for</strong>(option) 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


48
49
50</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/answer.rb', line 48</span>

<span class='def def kw'>def</span> <span class='choice_for identifier id'>choice_for</span><span class='lparen token'>(</span><span class='option identifier id'>option</span><span class='rparen token'>)</span>
  <span class='choice_hash identifier id'>choice_hash</span><span class='lbrack token'>[</span><span class='option identifier id'>option</span><span class='rbrack token'>]</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="choice_hash-instance_method">
  
    - (<tt>Object</tt>) <strong>choice_hash</strong>(options = {}) 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


52
53
54
55
56
57</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/answer.rb', line 52</span>

<span class='def def kw'>def</span> <span class='choice_hash identifier id'>choice_hash</span><span class='lparen token'>(</span><span class='options identifier id'>options</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
  <span class='if if kw'>if</span> <span class='notop op'>!</span><span class='@choice_hash ivar id'>@choice_hash</span> <span class='orop op'>||</span> <span class='options identifier id'>options</span><span class='lbrack token'>[</span><span class='symbol val'>:rebuild</span><span class='rbrack token'>]</span>
    <span class='@choice_hash ivar id'>@choice_hash</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='semicolon token'>;</span> <span class='choices identifier id'>choices</span><span class='dot token'>.</span><span class='each identifier id'>each</span><span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='c identifier id'>c</span><span class='bitor op'>|</span> <span class='@choice_hash ivar id'>@choice_hash</span><span class='lbrack token'>[</span><span class='c identifier id'>c</span><span class='dot token'>.</span><span class='option identifier id'>option</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='c identifier id'>c</span><span class='rbrace token'>}</span>
  <span class='end end kw'>end</span>
  <span class='@choice_hash ivar id'>@choice_hash</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="hidden?-instance_method">
  
    - (<tt>Boolean</tt>) <strong>hidden?</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    

  </div>
</div>
<div class="tags">
  
<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


92</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/answer.rb', line 92</span>

<span class='def def kw'>def</span> <span class='hidden? fid id'>hidden?</span><span class='semicolon token'>;</span> <span class='questioning identifier id'>questioning</span><span class='dot token'>.</span><span class='hidden? fid id'>hidden?</span> <span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="integer?-instance_method">
  
    - (<tt>Boolean</tt>) <strong>integer?</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    

  </div>
</div>
<div class="tags">
  
<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


99</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/answer.rb', line 99</span>

<span class='def def kw'>def</span> <span class='integer? fid id'>integer?</span><span class='semicolon token'>;</span> <span class='question identifier id'>question</span><span class='dot token'>.</span><span class='type identifier id'>type</span><span class='dot token'>.</span><span class='integer? fid id'>integer?</span> <span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="location?-instance_method">
  
    - (<tt>Boolean</tt>) <strong>location?</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    

  </div>
</div>
<div class="tags">
  
<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


97</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/answer.rb', line 97</span>

<span class='def def kw'>def</span> <span class='location? fid id'>location?</span><span class='semicolon token'>;</span> <span class='question_type_name identifier id'>question_type_name</span> <span class='eq op'>==</span> <span class='string val'>&quot;location&quot;</span> <span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="numeric?-instance_method">
  
    - (<tt>Boolean</tt>) <strong>numeric?</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    

  </div>
</div>
<div class="tags">
  
<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


98</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/answer.rb', line 98</span>

<span class='def def kw'>def</span> <span class='numeric? fid id'>numeric?</span><span class='semicolon token'>;</span> <span class='question identifier id'>question</span><span class='dot token'>.</span><span class='type identifier id'>type</span><span class='dot token'>.</span><span class='numeric? fid id'>numeric?</span> <span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="options-instance_method">
  
    - (<tt>Object</tt>) <strong>options</strong> 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


100</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/answer.rb', line 100</span>

<span class='def def kw'>def</span> <span class='options identifier id'>options</span><span class='semicolon token'>;</span> <span class='question identifier id'>question</span><span class='dot token'>.</span><span class='options identifier id'>options</span> <span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="question-instance_method">
  
    - (<tt>Object</tt>) <strong>question</strong> 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


89</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/answer.rb', line 89</span>

<span class='def def kw'>def</span> <span class='question identifier id'>question</span><span class='semicolon token'>;</span> <span class='questioning identifier id'>questioning</span> <span class='integer val'>? </span><span class='questioning identifier id'>questioning</span><span class='dot token'>.</span><span class='question identifier id'>question</span> <span class='colon op'>:</span> <span class='nil nil kw'>nil</span> <span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="question_hint-instance_method">
  
    - (<tt>Object</tt>) <strong>question_hint</strong> 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


94</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/answer.rb', line 94</span>

<span class='def def kw'>def</span> <span class='question_hint identifier id'>question_hint</span><span class='semicolon token'>;</span> <span class='question identifier id'>question</span><span class='dot token'>.</span><span class='hint identifier id'>hint</span> <span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="question_name-instance_method">
  
    - (<tt>Object</tt>) <strong>question_name</strong> 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


93</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/answer.rb', line 93</span>

<span class='def def kw'>def</span> <span class='question_name identifier id'>question_name</span><span class='semicolon token'>;</span> <span class='question identifier id'>question</span><span class='dot token'>.</span><span class='name identifier id'>name</span> <span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="question_type_name-instance_method">
  
    - (<tt>Object</tt>) <strong>question_type_name</strong> 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


95</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/answer.rb', line 95</span>

<span class='def def kw'>def</span> <span class='question_type_name identifier id'>question_type_name</span><span class='semicolon token'>;</span> <span class='question identifier id'>question</span><span class='dot token'>.</span><span class='type identifier id'>type</span><span class='dot token'>.</span><span class='name identifier id'>name</span> <span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="rank-instance_method">
  
    - (<tt>Object</tt>) <strong>rank</strong> 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


90</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/answer.rb', line 90</span>

<span class='def def kw'>def</span> <span class='rank identifier id'>rank</span><span class='semicolon token'>;</span> <span class='questioning identifier id'>questioning</span><span class='dot token'>.</span><span class='rank identifier id'>rank</span> <span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="required?-instance_method">
  
    - (<tt>Boolean</tt>) <strong>required?</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    

  </div>
</div>
<div class="tags">
  
<h3>Returns:</h3>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Boolean</tt>)</span>
      
      
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


91</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/answer.rb', line 91</span>

<span class='def def kw'>def</span> <span class='required? fid id'>required?</span><span class='semicolon token'>;</span> <span class='questioning identifier id'>questioning</span><span class='dot token'>.</span><span class='required? fid id'>required?</span> <span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="select_options-instance_method">
  
    - (<tt>Object</tt>) <strong>select_options</strong> 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


101</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'app/models/answer.rb', line 101</span>

<span class='def def kw'>def</span> <span class='select_options identifier id'>select_options</span><span class='semicolon token'>;</span> <span class='question identifier id'>question</span><span class='dot token'>.</span><span class='select_options identifier id'>select_options</span> <span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>
    
    <div id="footer">
  Generated on Thu Dec  8 13:43:27 2011 by 
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.7.3 (ruby-1.8.7).
</div>

  </body>
</html>